import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2024-04-18
 * Time: 23:12
 */

/**
 * 字节流:InputStream
 * 一次读一个字节
 */
public class Demo4 {
    public static void main(String[] args) throws IOException {
        try(InputStream inputStream = new FileInputStream("d:/text.txt")){
           while(true){
            int n = inputStream.read();
            if(n==-1){
                break;
            }
               System.out.printf("ox%x ",n);
           }
        }
    }
}
